package com.quick.api;

import com.quick.domain.Book;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 功能描述 TODO
 *
 * @Created Time 2017/9/11
 * @Edited Time 2017/9/11
 * @Created by wangxin43
 */
@RestController
@RequestMapping("/book")
public class BookController {

    @RequestMapping("/add")
    public String add(@Valid Book book, BindingResult result){
        System.out.println(result.toString());
        System.out.println(book.toString());
        return result.toString();
    }
}
